home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
Cando v1.6 disk 2.adf
/
HelpFiles
/
Variables, Advanced
< prev
next >
Wrap
Text File
|
1992-01-31
|
11KB
|
501 lines
F- Alias |alias|
F- BumpRevision |bumprevision|
F- Case |case|
F- CharsToHex |charstohex|
C- DeleteArrayEntry |deletearrayentry|
F- Evaluate |evaluate|
F- EvaluateExpression |evaluateexpression|
F- FirstArrayIndex |firstarrayindex|
F- FormatValue |formatvalue|
V- GetDBObjects |getdbobjects|
C- Global |global|
F- HexToChars |hextochars|
F- HexToInteger |hextointeger|
V- Infinity |infinity|
F- IntegerToHex |integertohex|
F- IfThen |ifthen|
F- Input |input|
C- InsertArrayEntry |insertarrayentry|
C- InsertRecordNames |insertrecordnames|
F- IsAlias |isalias|
F- LastArrayIndex |lastarrayindex|
F- Limit |limit|
F- LoadVariable |loadvariable|
C- Local |local|
F- Match |match|
F- NextArrayIndex |nextarrayindex|
V- NotANumber |notanumber|
F- NumberOfArrayEntries |numberofarrayentries|
F- PreviousArrayIndex |previousarrayindex|
C- SaveVariable |savevariable|
F- SearchArray |searcharray|
C- SetDBObjects |setdbobjects|
C- SetSearchArrayFlags |setsearcharrayflags|
C- SortArray |sortarray|
C- Static |static|
F- ValidReal |validreal|
F- VarType |vartype|
F- VerifyExpression |verifyexpression|
[E]
|alias|
WT <Variable>=Alias({String})
PL Makes the resulting variable the same
PL variable as the variable name given in the
PL {String}. See pages 6-16, 6-28 and 6-50
PL thru 6-54 in the supplement manual for a
PL full description of this command.
PT SEE ALSO:
BS IsAlias
PT .
ED
|bumprevision|
WT {String}=BumpRevision({String})
PL Changes the revision of {String} in the
PL same manner as the Workbench Duplicate
PL function does with a filename. See page
PL 6-16 in the yellow manual for examples.
ED
|case|
WT {Result}=Case({Integer}, {Expression1} [,up to ten expressions] )
PL Returns the expression corresponding to the
PL {Integer}. For example:
PL <- Let X = 2
PL <- Echo Case(X,"Gold","Silver","Bronze")
PL -> Silver
PT SEE ALSO:
BS IfThen
PT and
BS Match
PT .
ED
|charstohex|
WT {HexString}=CharsToHex({String})
PL This converts a normal string into a hex-
PL string. The hexstring will have twice as
PL many characters as the given string.
PL <- Echo CharsToHex("CanDo 1.6")
PL -> 43616E446F2056312E36
PT SEE ALSO:
BS HexToChars
PT and
BS FileWriteChars
PT .
ED
|deletearrayentry|
WT DeleteArrayEntry <ArrayVar>, {ArrayIndex}
PL Deletes the array entry at the given index
PL in the specified array variable. All
PL indices greater than the specified index
PL will be renumbered starting at Index+1.
PL
PT SEE ALSO:
BS InsertArrayEntry
PT and
BS Dispose
PT .
ED
|evaluate|
WT {Result}=Evaluate({Expression})
PT SEE:
BS EvaluateExpression
PT .
ED
|evaluateexpression|
WT {Result}=EvaluateExpression({Expression})
PL If the string contains a valid expression,
PL this function returns its result. If
PL the expression is not valid it will cause
PT a run time error. Use
BS VerifyExpression
PL
PT first to avoid such problems.
ED
|firstarrayindex|
WT {ArrayIndex}=FirstArrayIndex(<ArrayVar>)
PL Returns the integer value of the smallest
PL index in the array specified by VarName.
PL If the array does not have any entries,
PL this function will return the value 0 and
PT the system variable
BS SearchFound
PL will be set
PT to
BS False
PT . SEE ALSO:
BS LastArrayIndex
PT .
ED
|formatvalue|
WT {String}=FormatValue({Value}, {FormatString})
PL This will format {Value} using the
PL {FormatString}, which describes how you want
PL the number to represented. See pages 6-6
PL thru 6-9 in the supplement manual for a full
PL description of this command.
ED
|getdbobjects|
WT {RecordVar}=GetDBObjects
PL Returns a record variable containing a
PL Record corresponding to the matching
PL qualifying Objects in the Current Card.
PL See page 6-22 in the supplement manual
PL for a full description of this command.
PT SEE ALSO:
BS SetDBObjects
PT .
ED
|global|
WT Global <VarName>
PL All variables are global by default, except
PT those that are declared with the
BS Local
PL and
BS Static
PL commands, but this command was made
PL for consistency.
ED
|hextochars|
WT {String}=HexToChars({HexString})
PT This converts the result of
BS CharsToHex
PL
PT function or the
BS FileReadChars
PL command into
PL a normal character string.
ED
|hextointeger|
WT {Integer}=HexToInteger({HexString})
PT This converts the result of
BS IntegerToHex
PL
PT function or the
BS FileReadChars
PL command into
PL a normal integer.
ED
|infinity|
WT {Real}=Infinity
PL Returns the IEEE double precision value for
PL Infinity. See page 6-6 in the supplement
PL manual for a full description of this
PL command.
PL
PT SEE ALSO:
BS NotANumber
PT and
BS ValidReal
PT .
ED
|ifthen|
WT {Result}=IfThen({Logical}, {TrueExpression} [,{FalseExpression}])
PL This returns the {TrueExpression} if the
PT {Logical} is
BS True
PL , otherwise it returns the
PT {FalseExpression} or
BS Nothing
PL if the {False-
PL Expression} is not given.
PL
PT SEE ALSO:
BS Match
PT and
BS Case
PT .
ED
|input|
WT {String}=Input({Prompt})
PL Similar to Input Function in BASIC. It
PL displays the "Prompt" in the CLI and waits
PL for user to type information ending in the
PL RETURN key being pressed. This function
PL returns the information typed by the user.
PL You must have a CLI for this to work.
ED
|insertarrayentry|
WT InsertArrayEntry <ArrayVar>, {ArrayIndex}
PL Makes room for a new array index in the
PL specified array. This cause all Array
PL Indicies grater than the specified Index to
PL be renumbered starting at Index+1. This
PL is useful for adding records to a database.
PT SEE ALSO:
BS DeleteArrayEntry
PT .
ED
|insertrecordnames|
WT InsertRecordNames <RecordVar>
PL Types the record names for the specified
PL RecordVar into the current document. This
PL can be used to find out any unknown Record
PL Names within the variable specified.
ED
|integertohex|
WT {HexString}=IntegerToHex({Integer})
PL This converts an integer into a hexstring.
PL The resulting string will be two, four, six
PL or eight characters long.
PL <- Echo IntegerToHex(1256)
PL -> 04E8
PT SEE ALSO:
BS HexToInteger
PT and
BS CharsToHex
PT .
ED
|isalias|
WT {Logical}=IsAlias(<VarName>)
PT This returns
BS True
PL if the variable indicated
PL by <VarName> is an aliased variable.
PL
PT SEE ALSO:
BS Alias
PT .
ED
|lastarrayindex|
WT {ArrayIndex}=LastArrayIndex(<ArrayVar>)
PL Returns the integer value of the largest
PL index in the array specified by VarName.
PL If the array does not have any entries,
PL this function will return the value 0 and
PT the system variable
BS SearchFound
PL will be set
PT to
BS False
PT . SEE ALSO:
BS FirstArrayIndex
PT .
ED
|limit|
WT {Integer}=Limit({MinLimit}, {MaxLimit}, {TestInteger})
PL Returns the {TestInteger} if it is between
PL {MinLimit} and {MaxLimit}. If {TestInteger}
PL is greater than both limits, it will return
PL the larger of the limits. If {TestInteger}
PL is smaller than both limits, it will return
PL the smaller of the limits.
ED
|loadvariable|
WT {Result}=LoadVariable({FilePath})
PL Returns the contents of the variable which
PL was saved in the given file.
PL
PT SEE ALSO:
BS SaveVariable
PT .
ED
|local|
WT Local <VarName>
PL Declares a variable as available only to
PL the currently running script.
PL
PT SEE ALSO:
BS Static
PT and
BS Global
PT .
ED
|match|
WT {Integer}=Match({Integer or String}, {MatchingData1} [,up to ten matching datas])
PL Returns an integer value indicating which
PL {Integer or String} matches any of the
PL {MatchingData}s, or 0 if none do.
PL See page 6-41 in the supplement manual for
PL a full description of this command.
PT SEE ALSO:
BS Case
PT and
BS IfThen
PT .
ED
|nextarrayindex|
WT {ArrayIndex}=NextArrayIndex(<ArrayVar>, {ArrayIndex})
PL Returns the next larger Index value greater
PL than <Index> in the array specified by
PL VarName. If there is not one, this
PL function will return the given Index and
PT set the system variable
BS SearchFound
PL to
BS False
PT . SEE ALSO:
BS PreviousArrayIndex
PT .
ED
|notanumber|
WT {Real}=NotANumber
PL Contains the value returned by some floating
PL point operations which have undefined
PL results. See page 6-6 in the supplement
PL manual for a full description of this
PL command.
PT SEE ALSO:
BS Infinity
PT and
BS ValidReal
PT .
ED
|numberofarrayentries|
WT {Integer}=NumberOfArrayEntries(<ArrayVar>)
PL Returns the number of entries in the
PL specified array.
ED
|previousarrayindex|
WT {Integer}=PreviousArrayIndex(<ArrayVar>, {ArrayIndex})
PL Returns the next smaller Index value
PL smaller than <Index> in the array specified
PL by VarName. If there is not one, this
PL function will return the given Index and
PT set the system variable
BS SearchFound
PL to
BS False
PT . SEE ALSO:
BS NextArrayIndex
PT .
ED
|savevariable|
WT SaveVariable <VarName>, {FilePath}
PL Saves the contents of Variable into the
PL specified file. If the variable is an
PL array or record, the entire array or record
PL will be saved.
PL
PT SEE ALSO:
BS LoadVariable
PT .
ED
|searcharray|
WT {ArrayIndex}=SearchArray(<ArrayVar>, {DataToSearchFor} [,{KeyString} [,{StartAtIndex}]])
PL Searches the given array for the given
PL value. The {KeyString} specifies the record
PL name or subarray index to search on. The
PL {StartAtIndex} may also be specified.
PT SEE ALSO:
BS SetSearchArrayFlags
PL and
PT
BS SearchFound
PT .
ED
|setdbobjects|
WT SetDBObjects <RecordVar>
PL Sets the DataBase qualifying objects in the
PL window to the corresponding record entries.
PL
PT SEE ALSO:
BS GetDBObjects
PT .
ED
|setsearcharrayflags|
WT SetSearchArrayFlags <flags>
PL This adjusts the searching parameters used
PT by the
BS SearchArray
PL function. See page 6-19
PL in the supplement manual for a full
PL description of this command.
ED
|sortarray|
WT SortArray <ArrayVar>, <flags> [,{KeyString}]
PL Sorts the specified array variable. See
PL page 6-15 in the supplement manual for a
PL full description of this command.
ED
|static|
WT Static <VarName>
PT This is like
BS Local
PL , except static variables
PL survive beyond the current execution. Which
PL means that the next time thru this script
PL the variable will still contain the old
PL value.
PT SEE ALSO:
BS Global
PT .
ED
|validreal|
WT {Logical}=ValidReal({Real})
PT Returns
BS True
PL if the value is a valid
PL non-infinite real number and is not a
PL NotANumber. See page 6-6 in the supplement
PL manual for a full description of this
PL command.
PT SEE ALSO:
BS NotANumber
PT and
BS Infinity
PT .
ED
|vartype|
WT {String}=VarType(<VarName>)
PL Returns a string indicating the value type
PL for a specified <VarName>. The can be:
PL "String", "Integer", "Real", "Logical",
PL "Nothing", "System", "Array" or "Record".
PT NOTE:
BS Alias
PL variables can only be discovered
PT with the
BS IsAlias
PL function.
ED
|verifyexpression|
WT {Logical}=VerifyExpression({Expression})
PT Returns
BS True
PL if the string contains a
PL valid expression, otherwise it returns
BS False
PL . This command should be used
PT before using the
BS EvaluateExpression
PL function
PL to avoid run time errors.
ED